public class Main {
    public static void main(String[] args) {
        // 父类引用子类实例
        Animal dog = new Dog();
        Animal cat = new Cat();

        Person person = new Person();

        // 调用方法
        person.feed(dog);
        person.feed(cat);

        person.catchAnimal((Afraid) dog);
        person.catchAnimal((Afraid) cat);
    }
}